package cn.com.ejiakanghu.dto;

import org.linlinjava.litemall.db.domain.AgedmallHospitalChannelLink;
import org.linlinjava.litemall.db.domain.AgedmallHospitalSend;

import java.util.List;

/**
 * @author wj
 * @date 2021/12/7 16:12
 */
public class HospitalLinkDataDto {

    private List<HospitalSendData> hospitalList;

    private String code;

    private String name;

    private Integer defHosId;

    private Integer isHaveBuyCart;

    private Integer isSwitchNormal;

    private Integer hosGoodsType;

    private Integer backHomePage;

    private Integer saleUserId;


    public HospitalLinkDataDto() {
    }


    public HospitalLinkDataDto(List<HospitalSendData> hospitalList, String code, String name, Integer defHosId, Integer isHaveBuyCart, Integer isSwitchNormal, Integer hosGoodsType, Integer backHomePage, Integer saleUserId) {
        this.hospitalList = hospitalList;
        this.code = code;
        this.name = name;
        this.defHosId = defHosId;
        this.isHaveBuyCart = isHaveBuyCart;
        this.isSwitchNormal = isSwitchNormal;
        this.hosGoodsType = hosGoodsType;
        this.backHomePage = backHomePage;
        this.saleUserId = saleUserId;
    }

    public HospitalLinkDataDto( AgedmallHospitalChannelLink hospitalChannelLink) {
        this.code = hospitalChannelLink.getLinkUrl();
        this.name = hospitalChannelLink.getChannelName();
        this.isHaveBuyCart = hospitalChannelLink.getShoppingCart();
        this.isSwitchNormal = hospitalChannelLink.getNormalDistribution();
        this.hosGoodsType = conversionGoodsShowToHosGoodsType(hospitalChannelLink.getGoodsShow());
        this.backHomePage = hospitalChannelLink.getOrderRedirection();
    }

    public Integer conversionGoodsShowToHosGoodsType(Integer goodsShow){
        switch (goodsShow){
            case 0:
                return 4;
            case 1:
                return 5;
            default:
                return 0;
        }
    }

    public List<HospitalSendData> getHospitalList() {
        return hospitalList;
    }

    public void setHospitalList(List<HospitalSendData> hospitalList) {
        this.hospitalList = hospitalList;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getDefHosId() {
        return defHosId;
    }

    public void setDefHosId(Integer defHosId) {
        this.defHosId = defHosId;
    }

    public Integer getIsHaveBuyCart() {
        return isHaveBuyCart;
    }

    public void setIsHaveBuyCart(Integer isHaveBuyCart) {
        this.isHaveBuyCart = isHaveBuyCart;
    }

    public Integer getIsSwitchNormal() {
        return isSwitchNormal;
    }

    public void setIsSwitchNormal(Integer isSwitchNormal) {
        this.isSwitchNormal = isSwitchNormal;
    }

    public Integer getHosGoodsType() {
        return hosGoodsType;
    }

    public void setHosGoodsType(Integer hosGoodsType) {
        this.hosGoodsType = hosGoodsType;
    }

    public Integer getBackHomePage() {
        return backHomePage;
    }

    public void setBackHomePage(Integer backHomePage) {
        this.backHomePage = backHomePage;
    }

    public Integer getSaleUserId() {
        return saleUserId;
    }

    public void setSaleUserId(Integer saleUserId) {
        this.saleUserId = saleUserId;
    }
}
